package main

import (
	"fmt"
	"runtime"
	"time"
)

func f() {
	f()
}

func main() {
	before := stackSize()
	go f()
	after := stackSize()
	fmt.Printf("%.3fkb", float64(after-before)/1024)
	time.Sleep(10 * time.Second)
}

func stackSize() uint64 {
	runtime.GC()
	var m runtime.MemStats
	runtime.ReadMemStats(&m)
	return m.StackSys
}
